package org.footito.android.api;

import java.util.ArrayList;

public class StatusFromAPI {
	private ArrayList<CommentFromAPI> comments = new ArrayList<CommentFromAPI>();
	private int id;
	private String content;
	private int teamId;
	private String link;
	private String timestamp;
	private int positive_likes;
	private int negative_likes;

	public ArrayList<CommentFromAPI> getComments() {
		return comments;
	}

	public int getId() {
		return id;
	}

	public String getContent() {
		return content;
	}

	public int getTeamId() {
		return teamId;
	}

	public String getLink() {
		return link;
	}

	public String getTimestamp() {
		return timestamp;
	}

	public int getPositiveLike() {
		return positive_likes;
	}

	public int getNegativeLike() {
		return negative_likes;
	}

	public StatusFromAPI(int id, String content, int teamId, String link, String timestamp, int positive_likes_status, int negative_likes_status) {
		this.id = id;
		this.content = content;
		this.teamId = teamId;
		this.link = link;
		this.timestamp = timestamp;
		this.positive_likes = positive_likes_status;
		this.negative_likes = negative_likes_status;
	}

	public void addComment(CommentFromAPI comment) {
		comments.add(comment);
	}

	public boolean isValid() {
		if (id < 0 || teamId < 0 || negative_likes < 0 || positive_likes < 0)
			return false;
		if (content == null || content.equalsIgnoreCase(""))
			return false;
		if (link == null || link.equalsIgnoreCase(""))
			return false;
		if (timestamp == null || timestamp.equalsIgnoreCase(""))
			return false;
		return true;
	}

}
